<template>
    <!-- html -->
    <div class="PamasRouter">
        <h3>this is PamasRouter.</h3>
        <div>
            <ul>
                <li>{{ params.id }}</li>
                <li>{{ params.name }}</li>
                <li>{{ params.age }}</li>
            </ul>
        </div>
    </div>
</template>

<!-- 安装 vue 路由模块  npm install vue-router -->

<!-- npm i vite-plugin-vue-setup-extend -D -->
<script lang="ts" setup name='PamasRouter'>
import { toRefs } from 'vue';
import { useRoute } from 'vue-router'
const router = useRoute()
console.log(router)
const { params } = toRefs(router)
</script>  


<style scoped>
/* 样式 */
.PamasRouter {
    background-color: skyblue;
    border-radius: 10px;
    padding: 20px;
}
</style>